home *** CD-ROM | disk | FTP | other *** search
/ Whiteline: delta / whiteline CD Series - delta.iso / tex / style / misc / insertpl.sty < prev    next >
Text File  |  1995-11-25  |  5KB  |  114 lines

  1. %
  2. \typeout{insertplot.sty  version 1.08  08 May 1992.}
  3. %
  4. % Use this macro in conjunction with the Arbortext DVILASER/PS driver.
  5. % It may be used with user-written PostScript code, DI-3000/PICSURE,
  6. % PVI-WAVE, GEM ARTLINE, DESIGNER, AUTOSKETCH and ......
  7. %
  8. % Please feel free to redistribute this file to other interested users.
  9. % I would like to hear about any improvements for eventual inclusion
  10. % in future versions.
  11. %
  12. % Change History.
  13. % (1) 25/10/89. V1.01. Added driver option 6, PS  for PVI-WAVE.
  14. %                      Added driver option 7, EPS for PVI-WAVE.
  15. % (2) 27/10/89. V1.02. PICSURE driver changed. Added `flip' to
  16. %                      ensure correct orientation.
  17. % (3) 08/02/90. V1.03. Added driver option 8, AutoSketch.
  18. % (4) 10/04/91  V1.04. Added '\letter {} def' to the PICSURE option.
  19. % (5) 22/10/91  V1.05. Added driver option 9, Erlangen Graphics System
  20. % (6) 14/11/91  V1.06. Added driver option 10, IslandDraw.
  21. % (7) 24/03/92  V1.07. Added driver option 11, MATLAB.
  22. % (8) 08/05/92  V1.08. Added driver option 12, GNU Plot
  23. %
  24. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  25. %
  26. %   C. E. Higgs
  27. %   Computational Physics Group
  28. %   Paul Scherrer Institute
  29. %   CH-5232 Villigen PSI
  30. %   Switzerland
  31. %   tel: + (056) 99 20 62
  32. %   Email: HIGGS@CAGEIR5A     (Bitnet)
  33. %          higgs@csun.psi.ch  (X.400)
  34. %
  35. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  36. %
  37. % WARNING: For correct inclusion, user-written PostScript code in the
  38. %          LANDSCAPE mode must include the following before any other
  39. %          commands.
  40. %
  41. %          90 rotate   0 -600 translate
  42. %
  43. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  44. %
  45. % parameter #1: Offset from left margin.
  46. %           #2: PostScript file name for inclusion.
  47. %           #3: Vertical space to leave for the figure.
  48. %           #4: Scaling factor on X-axis.
  49. %           #5: Scaling factor on Y-axis.
  50. %           #6: Orientation of original figure.
  51. %           Options are:-
  52. %               landscape = original drawing was A4-quer.
  53. %               portrait  = original drawing was A4-hoch.
  54. %           #7: Originating graphics package.
  55. %           Options are:-
  56. %               1 = user-written PostScript.
  57. %               2 = DI-3000/PICSURE.
  58. %               3 = GEM Artline.
  59. %               4 = Designer.
  60. %               5 = Buerokomm.
  61. %               6 = PVI-WAVE (PS  driver).
  62. %               7 = PVI-WAVE (EPS driver).
  63. %               8 = AUTOSKETCH
  64. %               9 = ERLANGEN GRAPHICS SYSTEM
  65. %              10 = ISLAND_DRAW
  66. %              11 = MATLAB
  67. %              12 = GNU Plot
  68. %
  69. % Description of insertplot internal parameters.
  70. %
  71. % angl          rotation angle for landscape figs.
  72. % a4            DI-3000/PICSURE.  Deactivate this.
  73. % erasepage     DI-3000/PICSURE.  Deactivate this.
  74. % letter        DI-3000/PICSURE.  Deactivate this.
  75. % figsave       save
  76. % flip          ensure same orientation for all driver options.
  77. %               180 degree rotation upon itself.
  78. % initgraphics  DI-3000/PICSURE.  Deactivate this.
  79. % showpage      PostScript. Deactivate this
  80. % slide         rotate and shift landscape figs.
  81. % xxx           horiz. shift (in pt) for repositioning.
  82. % yyy           vert.  shift (in pt) for repositioning.
  83. %
  84. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  85. \def\insertplot#1#2#3#4#5#6#7{\par\nointerlineskip       %
  86.   \hbox{\hskip #1 \vbox to #3{\vfil                      %
  87.   \special{ps::[asis,begin] 0 SPB  /figsave save def     %
  88.   /showpage {} def /slide {} def /flip {} def            %
  89.  #7 1 eq {/xxx  -100 def /yyy 600 def /angl -90 def }if  %  user written PS
  90.  #7 2 eq {/xxx  -100 def /yyy 600 def /angl -90 def      %  DI-3000/PICSURE
  91.       /initgraphics {} def /erasepage {} def /a4 {} def  %  DI-3000/PICSURE
  92.       /letter {} def                                     %  DI-3000/PICSURE
  93. %     /flip{(#6) (portrait) eq { 590 #4 mul              %  DI-3000/PICSURE
  94. %           840 #5 mul translate 180 rotate}if}def
  95.                                                     }if  %  DI-3000/PICSURE
  96.  #7  3 eq {/xxx   750 def /yyy   0 def /angl +90 def }if %  GEM ARTLINE
  97.  #7  4 eq {/xxx   750 def /yyy   0 def /angl -90 def }if %  DESIGNER
  98.  #7  5 eq {/xxx     0 def /yyy 592 def /angl -90 def }if %  Buerokomm
  99.  #7  6 eq {/xxx   640 def /yyy -55 def /angl +90 def }if %  PVI-WAVE (PS)
  100.  #7  7 eq {/xxx  -100 def /yyy   0 def /angl +90 def }if %  PVI-WAVE (EPS) 
  101.  #7  8 eq {/xxx     0 def /yyy 600 def /angl -90 def }if %  AUTOSKETCH
  102.  #7  9 eq {/xxx   -25 def /yyy 550 def /angl -90 def }if %  EGS
  103.  #7 10 eq {/xxx  -100 def /yyy 600 def /angl -90 def }if %  ISLAND_DRAW
  104.  #7 11 eq {/xxx   750 def /yyy   0 def /angl +90 def }if %  MATLAB
  105.  #7 12 eq {/xxx  -100 def /yyy 600 def /angl -90 def }if %  GNU Plot
  106.  /slide{(#6) (landscape) eq                              %
  107.   {xxx #4 mul yyy #5 mul translate angl rotate}if} def   %
  108.  gsave Xpos Ypos translate slide flip #4 #5 scale}       %
  109.  \special{ps: plotfile #2 asis} \special{ps::[asis,end]  %
  110.  grestore figsave restore 0 SPE}}}}                      %
  111. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  112. %
  113. % That's it.
  114.